package a.f.h.a.b;

import a.c.ab;
import a.c.q;
import a.f.h.a.a.e;
import a.f.h.a.a.i;
import a.f.h.a.a.n;

public class o
{
  private q a;
  private a.f.h.a.a.b c;
  private c d;
  private ab e;
  private int f;
  private static final int g = 0;
  private static final int i = 1;
  public static boolean j;
  
  public o(q paramq, a.f.h.a.a.b paramb)
  {
    this.a = paramq;
    this.c = paramb;
    this.d = new c(this.a, this.c);
    this.e = new ab();
  }
  
  public void a()
  {
    this.d.d();
  }
  
  public ab b()
  {
    return this.e;
  }
  
  public static ab a(q paramq, a.f.h.a.a.b paramb)
  {
    o localo = new o(paramq, paramb);
    localo.d();
    localo.a();
    return localo.b();
  }
  
  public static ab b(q paramq, a.f.h.a.a.b paramb)
  {
    o localo = new o(paramq, paramb);
    localo.c();
    localo.a();
    return localo.b();
  }
  
  public static boolean c(q paramq, a.f.h.a.a.b paramb)
  {
    o localo = new o(paramq, paramb);
    boolean bool = localo.h();
    localo.a();
    return bool;
  }
  
  private void c()
  {
    this.f = 1;
    e();
  }
  
  private void d()
  {
    this.f = 0;
    e();
  }
  
  private void e()
  {
    this.e.clear();
    this.d.i();
    this.d.e();
    g();
    this.d.j();
  }
  
  private void g()
  {
    this.d.g();
    n.a(new c_(null), this.d);
    this.d.h();
  }
  
  private boolean h()
  {
    this.d.i();
    this.d.e();
    this.d.g();
    b_ localb_ = new b_(null);
    n.a(localb_, this.d);
    this.d.h();
    this.d.j();
    return localb_.b;
  }
  
  private class b_
    implements i
  {
    a a;
    boolean b = true;
    
    private b_() {}
    
    public void a(e parame)
    {
      boolean bool = b.i;
      this.a = ((a)parame);
      if (!bool)
      {
        if (this.a.f()) {
          return;
        }
        this.a.c(o.this.a);
        if (bool) {}
      }
      else if (!a.a.m.c(o.this.a))
      {
        this.b = false;
      }
      this.a.a(o.this.a);
    }
    
    b_(o.0 param0)
    {
      this();
    }
  }
  
  private class c_
    implements i
  {
    a a;
    ab b;
    
    private c_() {}
    
    public void a(e parame)
    {
      boolean bool = b.i;
      int i = b.h;
      this.a = ((a)parame);
      if (!bool)
      {
        if (this.a.f()) {
          return;
        }
        this.a.c(o.this.a);
      }
      if (!bool) {
        if (o.this.f == 0)
        {
          if (bool) {
            break label135;
          }
          this.b = a.a.m.b(o.this.a);
          if (i == 0) {
            break label134;
          }
        }
      }
      if (!bool)
      {
        if (o.this.f == 1)
        {
          if (bool) {
            break label135;
          }
          this.b = a.a.m.e(o.this.a);
        }
      }
      else {
        if (i == 0) {
          break label134;
        }
      }
      throw new RuntimeException("Bad connection mode!");
      label134:
      label135:
      a.c.m localm = this.b.l();
      if (localm.e()) {
        o.this.e.add(localm.a());
      }
      while (bool)
      {
        this.a.a(localm.a());
        localm.f();
        if ((!bool) && (i != 0)) {
          return;
        }
        if (i == 0) {
          break;
        }
      }
      this.a.a(o.this.a);
    }
    
    c_(o.0 param0)
    {
      this();
    }
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.h.a.b.o
 * JD-Core Version:    0.7.0.1
 */